package com.bjsxt.shop.common.util;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class ConstatFinalUtil
{
	/*日志对象*/
	public static Logger LOGGER = LogManager.getLogger(ConstatFinalUtil.class); 

	/*json配置文件*/
	public static JSONObject RESOURCE_JSON = new JSONObject();
	/*json配置文件信息*/
	public static JSONObject INFO_JSON = new JSONObject();
	
	
	static 
	{
		FileUtil fileutil = new FileUtil(); 
		try
		{
			String resourceStr = fileutil.readFile(ConstatFinalUtil.class.getClassLoader().getResourceAsStream("resoureInfo.json"));
			RESOURCE_JSON = (JSONObject) JSON.parse(resourceStr);
			INFO_JSON = RESOURCE_JSON.getJSONObject("info");
			//ConstatFinalUtil.LOGGER.info(INFO_JSON);
		} catch (Exception e)
		{
			ConstatFinalUtil.LOGGER.error("读取json失败",e);
		}
	}
}
